﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Cepik
{
    public partial class DodanieOsoby : Form
    {
        public DodanieOsoby()
        {
            InitializeComponent();
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            BazaDanychDataSet1TableAdapters.OsobaTableAdapter osobaTableAdapter =
                new BazaDanychDataSet1TableAdapters.OsobaTableAdapter();


            osobaTableAdapter.Insert(
                this.textBox1.Text,
                this.textBox2.Text,
                this.textBox3.Text,
                Convert.ToInt32(this.textBox4.Text),
                Convert.ToInt32(this.textBox5.Text), 
                Convert.ToInt32(this.textBox6.Text),
                Convert.ToInt32(this.radioButton1.Checked));
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    }
}
